﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Quexcel.OpenXML.Interfaces;
using System.IO.Packaging;
using Quexcel.OpenXML.Excel.Worksheet.IO;
using Quexcel.OpenXML.Excel.Workbook.IO;
using Quexcel.OpenXML.Transaction;
using Quexcel.OpenXML.Excel.Worksheet;
using Quexcel.OpenXML.Excel.SharedString;
using Quexcel.OpenXML.Excel.SharedString.IO;
using System.Xml;
using Quexcel.OpenXML.Excel.Style.IO;

namespace Quexcel.OpenXML.Excel.Factory
{
    internal static class ReaderWriterBuilder
    {
        internal static IWorksheetReader GetWorksheetReader(PackagePart sheetPart, SharedStringData sharedStringData, XmlNamespaceManager nsManager)
        {
            return new WorksheetReader(sheetPart, sharedStringData, nsManager);
        }

        internal static IWorksheetWriter GetWorksheetWriter(PackagePart sheetPart, SharedStringData sharedStringData, XmlNamespaceManager nsManager)
        {
            return new WorksheetWriter(sheetPart, sharedStringData, nsManager);
        }

        internal static IWorkbookReader GetWorkbookReader(PackagePart workbookDocPart, Package xlPackage)
        {
            return new WorkbookReader(workbookDocPart, xlPackage);
        }

        internal static IWorkbookWriter GetWorkbookWriter(PackagePart workbookDocPart, Package xlPackage)
        {
            return new WorkbookWriter(workbookDocPart, xlPackage);
        }

        internal static ISharedStringReader GetSharedStringReader(PackagePart sheetPart, XmlNamespaceManager nsManager)
        {
            return new SharedStringReader(sheetPart, nsManager);
        }

        internal static ISharedStringWriter GetSharedStringWriter(PackagePart sheetPart, XmlNamespaceManager nsManager)
        {
            return new SharedStringWriter(sheetPart, nsManager);
        }

        internal static IStyleReader GetStyleReader(PackagePart sheetPart, XmlNamespaceManager nsManager)
        {
            return new StyleReader(sheetPart, nsManager);
        }

        internal static IStyleWriter GetStyleWriter(PackagePart sheetPart, XmlNamespaceManager nsManager)
        {
            return new StyleWriter(sheetPart, nsManager);
        }
    }
}
